package com.cxhc.system.service.app.impl;

import java.util.List;

import com.cxhc.common.annotation.Integral;
import com.cxhc.common.enums.IntegralType;
import com.cxhc.common.utils.DateUtils;
import com.cxhc.system.domain.app.RpCityBuildingCheck;
import com.cxhc.system.mapper.app.RpCityBuildingCheckMapper;
import com.cxhc.system.service.app.IRpCityBuildingCheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 住宅检查Service业务层处理
 * 
 * @author Dhq
 * @date 2024-09-23
 */
@Service
public class RpCityBuildingCheckServiceImpl implements IRpCityBuildingCheckService
{
    @Autowired
    private RpCityBuildingCheckMapper rpCityBuildingCheckMapper;

    /**
     * 查询住宅检查
     * 
     * @param id 住宅检查主键
     * @return 住宅检查
     */
    @Override
    public RpCityBuildingCheck selectRpCityBuildingCheckById(Long id)
    {
        return rpCityBuildingCheckMapper.selectRpCityBuildingCheckById(id);
    }

    /**
     * 查询住宅检查列表
     * 
     * @param rpCityBuildingCheck 住宅检查
     * @return 住宅检查
     */
    @Override
    public List<RpCityBuildingCheck> selectRpCityBuildingCheckList(RpCityBuildingCheck rpCityBuildingCheck)
    {
        return rpCityBuildingCheckMapper.selectRpCityBuildingCheckList(rpCityBuildingCheck);
    }

    /**
     * 新增住宅检查
     * 
     * @param rpCityBuildingCheck 住宅检查
     * @return 结果
     */
    @Override
    @Integral(IntegralType.BUILD_CHECK)
    public int insertRpCityBuildingCheck(RpCityBuildingCheck rpCityBuildingCheck)
    {
        return rpCityBuildingCheckMapper.insertRpCityBuildingCheck(rpCityBuildingCheck);
    }

    /**
     * 修改住宅检查
     * 
     * @param rpCityBuildingCheck 住宅检查
     * @return 结果
     */
    @Override
    public int updateRpCityBuildingCheck(RpCityBuildingCheck rpCityBuildingCheck)
    {
        rpCityBuildingCheck.setUpdateTime(DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS));
        return rpCityBuildingCheckMapper.updateRpCityBuildingCheck(rpCityBuildingCheck);
    }

    /**
     * 批量删除住宅检查
     * 
     * @param ids 需要删除的住宅检查主键
     * @return 结果
     */
    @Override
    public int deleteRpCityBuildingCheckByIds(Long[] ids)
    {
        return rpCityBuildingCheckMapper.deleteRpCityBuildingCheckByIds(ids);
    }

    /**
     * 删除住宅检查信息
     * 
     * @param id 住宅检查主键
     * @return 结果
     */
    @Override
    public int deleteRpCityBuildingCheckById(Long id)
    {
        return rpCityBuildingCheckMapper.deleteRpCityBuildingCheckById(id);
    }
}
